<?php

namespace App\Admin\Controllers;

use App\Admin\Forms\Settings\Other;
use App\Admin\Forms\Settings\Website;
use App\Http\Controllers\Controller;
use Encore\Admin\Controllers\Dashboard;
use Encore\Admin\Layout\Column;
use Encore\Admin\Layout\Content;
use Encore\Admin\Layout\Row;
use Encore\Admin\Widgets\Tab;
use Illuminate\Support\Facades\Cache;

class HomeController extends Controller
{
	public function index(Content $content)
	{
		return $content
			->title('Dashboard')
			->description('Description...')
			->row(Dashboard::title())
			->row(function (Row $row) {
				
				$row->column(4, function (Column $column) {
					$column->append(Dashboard::environment());
				});
				
				$row->column(4, function (Column $column) {
					$column->append(Dashboard::extensions());
				});
				
				$row->column(4, function (Column $column) {
					$column->append(Dashboard::dependencies());
				});
			});
	}
	
	public function configs(Content $content)
	{
		//图片上传，文章富文本,随言碎语,首页
		return $content
			->title('设置')
			->body(Tab::forms([
				                  'website' => Website::class,
				                  'other'   => Other::class,
			                  ]));
	}
}
